ObjSuf		= o
SrcSuf		= cxx
HeadSuf		= h


ALIHLT_LIBDIR = $(ALICE_ROOT)/HLT/build/lib


#ROOTLIBS	= `root-config --libs --glibs` -lGed -lFTGL -lRGL -lEve -lEG -lGeom -lTreePlayer -lProofPlayer -lProof
#ROOTLIBS	= `root-config --libs --glibs` -lGed -lEG -lGeom -lTreePlayer -lProofPlayer -lProof -lXMLParser
ROOTLIBS	= `root-config --libs --glibs` -lGed -lEG -lGeom -lTreePlayer -lProofPlayer -lProof -lXMLParser -lEve -lRGL

ALIROOTLIBS	= -L$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)  -lHLTbase -lAliHLTHOMER  -lAliHLTPHOS  -lRAWDatarec \
		   -lRAWDatabase -lESD -lSTEER -lSTEERBase -lCDB -lMinuit -lVMC -lPHOSbase -lPHOSshuttle -lPHOSUtils \
                   -lEveBase	

#ALIHLTLIBS	= -L$(ALIHLT_LIBDIR)  -lAliHLTUtil  -lHLTbase -lAliHLTHOMER -lAliHLTPHOS
ALIHLTLIBS	= -L$(ALIHLT_LIBDIR)   -lHLTbase -lAliHLTHOMER -lAliHLTPHOS

ALIROOTHLTPHOSINCLUDE	=-I$(ALICE_ROOT)/HLT/PHOS  -I$(ALICE_ROOT)/PHOS
ALIROOTHLTINCLUDE	= -I$(ALICE_ROOT)/HLT/BASE/HOMER  -I$(ALICE_ROOT)/HLT/BASE

ALIHLTINCLUDE		=-I$(ALIHLT_TOPDIR)/BASE/HOMER  -I$(ALIHLT_TOPDIR)/BASE
ALIHLTPHOSINCLUDE	=-I$(ALIHLT_TOPDIR)/PHOS -I$(ALIHLT_TOPDIR)/CALO


INCLUDES        = -I$(ROOTSYS)/include $(ALIHLTINCLUDE)  $(ALIHLTPHOSINCLUDE)  $(ALIROOTHLTPHOSINCLUDE) $(ALIROOTHLTINCLUDE)


MAINO					= main.$(ObjSuf)
MAINS					= main.$(SrcSuf)

GETEVENTBUTTONO				=AliHLTPHOSGetEventButton.$(ObjSuf)
GETEVENTBUTTONS				=AliHLTPHOSGetEventButton.$(SrcSuf)
GETEVENTBUTTONH				=AliHLTPHOSGetEventButton.$(HeadSuf)

ALIHLTPHOSONLINEDISPLAYO		=AliHLTPHOSOnlineDisplay.$(ObjSuf)
ALIHLTPHOSONLINEDISPLAYS		=AliHLTPHOSOnlineDisplay.$(SrcSuf)
ALIHLTPHOSONLINEDISPLAYH		=AliHLTPHOSOnlineDisplay.$(HeadSuf)

ALIHLTPHOSONLINEDISPLAYTH2DO		=AliHLTPHOSOnlineDisplayTH2D.$(ObjSuf)
ALIHLTPHOSONLINEDISPLAYTH2DS		=AliHLTPHOSOnlineDisplayTH2D.$(SrcSuf)
ALIHLTPHOSONLINEDISPLAYTH2DH		=AliHLTPHOSOnlineDisplayTH2D.$(HeadSuf)

ALIHLTPHOSONLINEDISPLAYBUTTONO		=AliHLTPHOSOnlineDisplayButton.$(ObjSuf)
ALIHLTPHOSONLINEDISPLAYBUTTONS		=AliHLTPHOSOnlineDisplayButton.$(SrcSuf)
ALIHLTPHOSONLINEDISPLAYBUTTONH		=AliHLTPHOSOnlineDisplayButton.$(HeadSuf)

ALIHLTPHOSONLINEDISPLAYTABO		=AliHLTPHOSOnlineDisplayTab.$(ObjSuf)
ALIHLTPHOSONLINEDISPLAYTABS		=AliHLTPHOSOnlineDisplayTab.$(SrcSuf)
ALIHLTPHOSONLINEDISPLAYTABH		=AliHLTPHOSOnlineDisplayTab.$(HeadSuf)

ALIHLTPHOSONLINEDISPLAYEVENTTABO	=AliHLTPHOSOnlineDisplayEventTab.$(ObjSuf)
ALIHLTPHOSONLINEDISPLAYEVENTTABS	=AliHLTPHOSOnlineDisplayEventTab.$(SrcSuf)
ALIHLTPHOSONLINEDISPLAYEVENTTABH	=AliHLTPHOSOnlineDisplayEventTab.$(HeadSuf)

ALIHLTPHOSONLINEDISPLAYFOURIERTABO	=AliHLTPHOSOnlineDisplayFourierTab.$(ObjSuf)
ALIHLTPHOSONLINEDISPLAYFOURIERTABS	=AliHLTPHOSOnlineDisplayFourierTab.$(SrcSuf)
ALIHLTPHOSONLINEDISPLAYFOURIERTABH	=AliHLTPHOSOnlineDisplayFourierTab.$(HeadSuf)

ALIHLTPHOSONLINEDISPLAYCALIBTABO	=AliHLTPHOSOnlineDisplayCalibTab.$(ObjSuf)
ALIHLTPHOSONLINEDISPLAYCALIBTABS	=AliHLTPHOSOnlineDisplayCalibTab.$(SrcSuf)
ALIHLTPHOSONLINEDISPLAYCALIBTABH	=AliHLTPHOSOnlineDisplayCalibTab.$(HeadSuf)


OBJS	= $(MAINO)  $(ALIHLTPHOSONLINEDISPLAYO)  $(ALIHLTPHOSONLINEDISPLAYTH2DO) $(ALIHLTPHOSONLINEDISPLAYTABO)\
	$(ALIHLTPHOSONLINEDISPLAYEVENTTABO)  	$(ALIHLTPHOSONLINEDISPLAYFOURIERTABO)  $(ALIHLTPHOSONLINEDISPLAYCALIBTABO) \
	$(GETEVENTBUTTONO) $(ALIHLTPHOSONLINEDISPLAYNUMBERENTRYO) $(ALIHLTPHOSONLINEDISPLAYBUTTONO)


pftest:$(OBJS)
	g++ -ggdb -g $(ROOTLIBS) $(ALIROOTLIBS) $(HLTLIBS)  $(OBJS) -o onlinedisplay
#HLT:	$(OBJS)	
#	g++ -ggdb -g $(ROOTLIBS) $(ALIHLTLIBS) $(ALIROOTLIBS) $(HLTLIBS)  $(OBJS) -o onlinedisplay	
HLT:	$(OBJS)	
	g++ -ggdb -g $(ROOTLIBS) $(ALIHLTLIBS) $(HLTLIBS)  $(OBJS) -o onlinedisplay	

$(MAINO):$(MAINS)
	g++ -ggdb -g $(INCLUDES)  -c $(MAINS)

$(ALIHLTPHOSONLINEDISPLAYO):$(ALIHLTPHOSONLINEDISPLAYS) $(ALIHLTPHOSONLINEDISPLAYH)
	g++ -ggdb -g $(INCLUDES)  -c $(ALIHLTPHOSONLINEDISPLAYS)

$(ALIHLTPHOSONLINEDISPLAYTH2DO):$(ALIHLTPHOSONLINEDISPLAYTH2DS) $(ALIHLTPHOSONLINEDISPLAYTH2DH)
	g++ -ggdb -g $(INCLUDES)  -c $(ALIHLTPHOSONLINEDISPLAYTH2DS)

$(ALIHLTPHOSONLINEDISPLAYBUTTONO):$(ALIHLTPHOSONLINEDISPLAYBUTTONS) $(ALIHLTPHOSONLINEDISPLAYBUTTONH)
	g++ -ggdb -g $(INCLUDES)  -c $(ALIHLTPHOSONLINEDISPLAYBUTTONS)

$(ALIHLTPHOSONLINEDISPLAYTABO):$(ALIHLTPHOSONLINEDISPLAYTABS) $(ALIHLTPHOSONLINEDISPLAYTABH)
	g++ -ggdb -g $(INCLUDES)  -c $(ALIHLTPHOSONLINEDISPLAYTABS)

$(ALIHLTPHOSONLINEDISPLAYEVENTTABO):$(ALIHLTPHOSONLINEDISPLAYEVENTTABS) $(ALIHLTPHOSONLINEDISPLAYEVENTTABH)
	g++ -ggdb -g $(INCLUDES)  -c $(ALIHLTPHOSONLINEDISPLAYEVENTTABS)

$(ALIHLTPHOSONLINEDISPLAYFOURIERTABO):$(ALIHLTPHOSONLINEDISPLAYFOURIERTABS) $(ALIHLTPHOSONLINEDISPLAYFOURIERTABH)
	g++ -ggdb -g $(INCLUDES)  -c $(ALIHLTPHOSONLINEDISPLAYFOURIERTABS)

$(ALIHLTPHOSONLINEDISPLAYCALIBTABO):$(ALIHLTPHOSONLINEDISPLAYCALIBTABS) $(ALIHLTPHOSONLINEDISPLAYCALIBTABH)
	g++ -ggdb -g $(INCLUDES)  -c $(ALIHLTPHOSONLINEDISPLAYCALIBTABS)

$(GETEVENTBUTTONO):$(GETEVENTBUTTONS) $(GETEVENTBUTTONH)
	g++ -ggdb -g $(INCLUDES)  -c $(GETEVENTBUTTONS)

clean:
	@rm -f *o *~ *# pftest
